package com.iims.finance.utils;

import cn.hutool.core.util.StrUtil;
import com.iims.finance.domain.CmisCwCollection;
import com.iims.finance.domain.CmisCwIncomeAffirm;
import com.iims.finance.domain.CmisCwInvoice;

/**
 * @author fanpei
 * @date 2021/7/9 23:49
 */
public class FinanceBusinessKeyUtils {

    /**
     * 获取收款业务Key
     *
     * @param invoice
     * @return
     */
    public static String getInvoiceBusinessKey(CmisCwInvoice invoice) {
        return StrUtil.join("CmisCwInvoice:", invoice.getInvoiceId());
    }

    public static String getCollectionBusinessKey(CmisCwCollection collection) {
        return StrUtil.join("CmisCwCollection:", collection.getCollectId());
    }

    public static String getIncomeAffirmBusinessKey(CmisCwIncomeAffirm affirm) {
        return StrUtil.join("CmisCwIncomeAffirm:", affirm.getAffirmId());
    }
}
